// Code generated by mockery v2.13.1. DO NOT EDIT.

package archivemocks

import (
	io "io"

	internal "github.com/wal-g/wal-g/internal"

	mock "github.com/stretchr/testify/mock"

	models "github.com/wal-g/wal-g/internal/databases/mongo/models"
)

// Downloader is an autogenerated mock type for the Downloader type
type Downloader struct {
	mock.Mock
}

// BackupMeta provides a mock function with given fields: name
func (_m *Downloader) BackupMeta(name string) (*models.Backup, error) {
	ret := _m.Called(name)

	var r0 *models.Backup
	if rf, ok := ret.Get(0).(func(string) *models.Backup); ok {
		r0 = rf(name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*models.Backup)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(name)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DownloadOplogArchive provides a mock function with given fields: arch, writeCloser
func (_m *Downloader) DownloadOplogArchive(arch models.Archive, writeCloser io.WriteCloser) error {
	ret := _m.Called(arch, writeCloser)

	var r0 error
	if rf, ok := ret.Get(0).(func(models.Archive, io.WriteCloser) error); ok {
		r0 = rf(arch, writeCloser)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// LastKnownArchiveTS provides a mock function with given fields:
func (_m *Downloader) LastKnownArchiveTS() (models.Timestamp, error) {
	ret := _m.Called()

	var r0 models.Timestamp
	if rf, ok := ret.Get(0).(func() models.Timestamp); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(models.Timestamp)
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// ListBackups provides a mock function with given fields:
func (_m *Downloader) ListBackups() ([]internal.BackupTime, []string, error) {
	ret := _m.Called()

	var r0 []internal.BackupTime
	if rf, ok := ret.Get(0).(func() []internal.BackupTime); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]internal.BackupTime)
		}
	}

	var r1 []string
	if rf, ok := ret.Get(1).(func() []string); ok {
		r1 = rf()
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]string)
		}
	}

	var r2 error
	if rf, ok := ret.Get(2).(func() error); ok {
		r2 = rf()
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// ListOplogArchives provides a mock function with given fields:
func (_m *Downloader) ListOplogArchives() ([]models.Archive, error) {
	ret := _m.Called()

	var r0 []models.Archive
	if rf, ok := ret.Get(0).(func() []models.Archive); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.Archive)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func() error); ok {
		r1 = rf()
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// LoadBackups provides a mock function with given fields: names
func (_m *Downloader) LoadBackups(names []string) ([]*models.Backup, error) {
	ret := _m.Called(names)

	var r0 []*models.Backup
	if rf, ok := ret.Get(0).(func([]string) []*models.Backup); ok {
		r0 = rf(names)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*models.Backup)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func([]string) error); ok {
		r1 = rf(names)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

type mockConstructorTestingTNewDownloader interface {
	mock.TestingT
	Cleanup(func())
}

// NewDownloader creates a new instance of Downloader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewDownloader(t mockConstructorTestingTNewDownloader) *Downloader {
	mock := &Downloader{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
